<?php defined('SYSPATH') or die('No direct script access.');

class Model_ItemAttribute extends ORM {
	
	protected $_table_name = 'item_attributes';
	
	protected $_has_many = array(
		'values' => array(
			'model' => 'value',
			'through' => 'itemattribute_values',
		),
	);
	
	protected $_belongs_to = array(
		'item' => array(
			'model' => 'item',
			'foreign_key' => 'item_id',
		),
		'attribute' => array(
			'model' => 'attribute',
			'foreign_key' => 'attribute_id',
		),
	);
}